package org.bing.engine.common.scheduler;

import java.util.List;

public class MultiTaskContainer extends SimpleTaskContainer {
    private List<AbstractTask> tasks;

    public void setTasks(List<AbstractTask> tasks) {
        this.tasks = tasks;
    }

    public void init() {
        if (tasks != null) {
            for (AbstractTask task : tasks) {
                try {
                    schedule(task);
                } catch (Exception e) {
                    logger.error("Fail to schedule " + task);
                }
            }
        }
    }
}
